﻿using System;

namespace Sencha.Direct
{
	[Serializable]
	public class RoutingException : ApplicationException
	{
		public RoutingException()
			: base(DefaultMessage()) { }
		public RoutingException(string message)
			: base(message ?? DefaultMessage()) { }
		public RoutingException(string message, Exception innerException)
			: base(message ?? DefaultMessage(), innerException) { }
		protected RoutingException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
			: base(info, context)
		{
		}

		private static string DefaultMessage()
		{
			return Loc.GetErrorString("Exception_DirectRoutingFailed");
		}
	}
}
